/*
 * Created on 2005-4-11
 *
 */
package com.hd123.rumba.util;

import java.io.Serializable;
import java.util.HashMap;

/**
 * @author caili
 */
public class AccessMode extends HashMap implements Serializable {

  public static int INVISIBLE = 0;
  public static int READONLY = 1;
  public static int READWRITE = 2;

  public AccessMode() {
    super();
  }

  public int getAccessMode(String key) {
    Integer i = (Integer) get(key);
    if (i == null)
      return -1;
    else
      return i.intValue();
  }

  public Object setAccessMode(String key, int mode) {
    return put(key, new Integer(mode));
  }
}
